#!/bin/bash

chmod +x lib/vecmath-1.3.1.jar
echo Compiling ...
javac -d bin -cp ./src:./lib/vecmath-1.3.1.jar src/helper/*.java src/primitive3D/*.java src/rayCaster/*.java
echo Compilation is done !!

echo ================================
echo Scene 1 - linear color variation
echo ================================
java -cp ./bin:./lib/vecmath-1.3.1.jar rayCaster.RayCasterApplication -i scene1.sc -o render1_linear.png -size 1000x1000 -fov 20 -cm ordered -cv linear -time

echo ================================
echo Scene 1 - log color variation
echo ================================
java -cp ./bin:./lib/vecmath-1.3.1.jar rayCaster.RayCasterApplication -i scene1.sc -o render1_log.png -size 1000x1000 -fov 20 -cm ordered -cv log -time


echo ================================
echo Scene 2 - linear color variation
echo ================================
java -cp ./bin:./lib/vecmath-1.3.1.jar rayCaster.RayCasterApplication -i scene2.sc -o render2_linear.png -size 1000x1000 -fov 20 -cm ordered -cv linear -time

echo ================================
echo Scene 2 - log color variation
echo ================================
java -cp ./bin:./lib/vecmath-1.3.1.jar rayCaster.RayCasterApplication -i scene2.sc -o render2_log.png -size 1000x1000 -fov 20 -cm ordered -cv log -time
 
echo ================================
echo Scene 3 - linear color variation
echo ================================
java -cp ./bin:./lib/vecmath-1.3.1.jar rayCaster.RayCasterApplication -i scene3.sc -o render3_linear.png -size 1000x1000 -fov 17.5 -cm ordered -cv linear -time

echo ================================
echo Scene 3 - log color variation
echo ================================
java -cp ./bin:./lib/vecmath-1.3.1.jar rayCaster.RayCasterApplication -i scene3.sc -o render3_log.png -size 1000x1000 -fov 17.5 -cm ordered -cv log -time

